#include<bits/stdc++.h>
using namespace std;

const int N=100100;

int n=0,ans=0;
int r[N];

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);


    cin>>n; ans=n;
    memset(r,0,sizeof r);
    for(int i=0;i<n;i++)    cin>>r[i];
    sort(r,r+n);
    int i=0,j=1,maxx=r[n-1];
    while(j<n)
    {
        if(r[i]<r[j])
        {
            ans--;
            j++;
            i++;
        }
        else if(r[j]==maxx&&r[i]==maxx)
        {
            cout<<ans<<"\n";
            return 0;
        }
        else
        {
            j++;
        }
    }
    cout<<ans<<"\n";
    return 0;
}
